<template>
  <div class="con">
    <div class="banxin">
      <ul class="tanxin lists">
        <li class="tanxin" v-for="(item, index) in cons" :key="index">
          <div class="list">
            <img
              :src="'http://sc.wolfcode.cn' + item.coverImg"
              alt=""
              class="img"
            />
            <p class="name">{{ item.name }}</p>
            <p class="price">{{ item.coin }}积分</p>
            <button >立即兑换</button>
            <img src="../../assets/images//home//new-j.png" alt="" class="img1" v-show="item.isLatest==1">
            <img src="../../assets/images//home//hot-j.png" alt="" class="img1" v-show="item.isHotSale==1">
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>

export default {
  data() {
    return {
     
    };
  },
  props:['cons',]
 
  
};
</script>
 
<style lang = "less" scoped>
@import "../../assets/base";

.lists {
  /* height: 412px; */
  /* background: pink; */
  .list {
    width: 285px;
    margin-right: 20px;
    position: relative;
    /* background: gold; */
    height: 412px;
    text-align: center;
    font-size: 18px;
    background: #fff;
    transition: 0.5s linear;
    &:last-of-type {
      margin-right: 0;
    }
     .img1{
        position: absolute;
        left: 0;
        top: 0;
      }
    .img {
      width: 100%;
      height: 250px;
      background: green;
      margin-bottom: 20px;
     
     
    }
    .name {
      margin-bottom: 20px;
    }
    .price {
      margin-bottom: 20px;
      color: red;
    }
    button {
      padding: 10px;
    }
    button:hover{
        background: blue;
        color: #fff;
        cursor: pointer;
    }
  }
  .list:hover{
    transform: translateY(-20px);
  }
}
</style>